﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 玩家每一手手牌记录表
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Entity, DbConfig.Data, IsExpired = false)]
	public class SharedUserHandCards : ShareEntity
	{
		public SharedUserHandCards()
			: base(false)
		{
		}
		public SharedUserHandCards(int tableId, int hand, int userId, int card0, int card1)
			: this()
		{
			this.UserID = userId;
			this.TableID = tableId;
			this.Hand = hand;
			this.Card0 = card0;
			this.Card1 = card1;
		}

		/// <summary>
		/// 桌子的逻辑ID
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true)]
		public int TableID { get; set; }

		/// <summary>
		/// 当前是第几手牌局
		/// </summary>        
		[ProtoMember(2)]
		[EntityField(true)]
		public int Hand { get; set; }

		[ProtoMember(3)]
		[EntityField(true)]
		public int UserID { get; set; }

		/// <summary>
		/// 手牌0
		/// </summary>        
		[ProtoMember(4)]
		[EntityField]
		public int Card0 { get; set; }

		/// <summary>
		/// 手牌1
		/// </summary>        
		[ProtoMember(5)]
		[EntityField]
		public int Card1 { get; set; }
	}
}
